import {
	apiResquest
} from '../utils/http.js'

//获取token
export const login = (code) => {
	return apiResquest({
		url: '/member/mp/token?code=' + code,
		method: 'GET'
	})
}

//上传用户信息
export const putUserInfo = (data) => {
	return apiResquest({
		url: '/member/mp/userinfo',
		method: 'PUT',
		query: data,
		power: 1
	})
}

//手机号码保存
export const putPhone = (data) => {
	return apiResquest({
		url: '/member/mp/mobile',
		method: 'PUT',
		query: data,
		power: 1
	})
}

// 获取用户信息
export const getUserInfo =()=>{
	return apiResquest({
		url:'/member/mp/userinfo',
		method: 'GET',
		power: 1
	})
}